home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Contrib / FindPearls / Rexx / openfilerwindow.rexx < prev    next >
OS/2 REXX Batch file  |  1996-10-20  |  760b  |  45 lines

  1. /* Opens a window in Filer */
  2.  
  3. parse arg pathname
  4.  
  5. ports=show('P','FilerRexx')
  6. if ports>0 then do
  7.     ports=show('P')
  8.     found=index(ports,'FilerRexx')
  9. end
  10. else do
  11.     found=0
  12. end
  13.  
  14. if found=0 then do
  15.     if exists("Meeting_Pearls_IV:") then do
  16.         address command "Run :Pearls/util/dir/Filer/Filer"
  17.         do i=1 until found~=0 | i=15
  18.             ports=show('P')
  19.             found=index(ports,'FilerRexx')
  20.             if found=0 then
  21.                 address command "Wait 1 SECS"
  22.         end
  23.     end
  24. end
  25.  
  26. if found>0 then do
  27.     address 'FilerRexx'
  28.     options results
  29.     READSOURCEDIR pathname
  30.     handle=result
  31.     /*lister set handle icons*/
  32.     FILERTOFRONT
  33.  
  34.     exit 0
  35. end
  36. else do
  37.     if exists("C/MetaTool") then do
  38.         address command "C/MetaTool Rexx/NoFiler TEXT"
  39.     end
  40.     else do
  41.         address command "MetaTool Rexx/NoFiler TEXT"
  42.     end
  43.     exit 10
  44. end
  45.